.class public abstract Les/jd0;
.super Ljava/lang/Object;
.source "SocketClient.java"


# instance fields
.field private a:Ljava/net/Socket;

.field private b:Ljava/io/InputStream;

.field private c:Ljava/io/OutputStream;

.field private d:Ljavax/net/SocketFactory;

.field private e:I


# direct methods
.method public constructor <init>(I)V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance p1, Les/id0;

    invoke-direct {p1}, Les/id0;-><init>()V

    iput-object p1, p0, Les/jd0;->d:Ljavax/net/SocketFactory;

    const/4 p1, 0x0

    .line 3
    iput p1, p0, Les/jd0;->e:I

    return-void
.end method


# virtual methods
.method public a()V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 4
    iget-object v0, p0, Les/jd0;->a:Ljava/net/Socket;

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    .line 5
    invoke-virtual {v0}, Ljava/net/Socket;->close()V

    .line 6
    iput-object v1, p0, Les/jd0;->a:Ljava/net/Socket;

    .line 7
    :cond_0
    iget-object v0, p0, Les/jd0;->b:Ljava/io/InputStream;

    if-eqz v0, :cond_1

    .line 8
    invoke-virtual {v0}, Ljava/io/InputStream;->close()V

    .line 9
    iput-object v1, p0, Les/jd0;->b:Ljava/io/InputStream;

    .line 10
    :cond_1
    iget-object v0, p0, Les/jd0;->c:Ljava/io/OutputStream;

    if-eqz v0, :cond_2

    .line 11
    invoke-virtual {v0}, Ljava/io/OutputStream;->close()V

    .line 12
    iput-object v1, p0, Les/jd0;->c:Ljava/io/OutputStream;

    :cond_2
    return-void
.end method

.method public a(I)V
    .locals 0

    .line 13
    iput p1, p0, Les/jd0;->e:I

    return-void
.end method

.method public a(Ljava/lang/String;I)V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    invoke-static {p1}, Ljava/net/InetAddress;->getByName(Ljava/lang/String;)Ljava/net/InetAddress;

    move-result-object p1

    invoke-virtual {p0, p1, p2}, Les/jd0;->a(Ljava/net/InetAddress;I)V

    return-void
.end method

.method public a(Ljava/net/InetAddress;I)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 2
    iget-object v0, p0, Les/jd0;->d:Ljavax/net/SocketFactory;

    invoke-virtual {v0, p1, p2}, Ljavax/net/SocketFactory;->createSocket(Ljava/net/InetAddress;I)Ljava/net/Socket;

    move-result-object p1

    iput-object p1, p0, Les/jd0;->a:Ljava/net/Socket;

    .line 3
    invoke-virtual {p0}, Les/jd0;->g()V

    return-void
.end method

.method protected b()Ljava/io/InputStream;
    .locals 1

    .line 1
    iget-object v0, p0, Les/jd0;->b:Ljava/io/InputStream;

    return-object v0
.end method

.method protected c()Ljava/io/OutputStream;
    .locals 1

    .line 1
    iget-object v0, p0, Les/jd0;->c:Ljava/io/OutputStream;

    return-object v0
.end method

.method public d()Ljava/net/InetAddress;
    .locals 1

    .line 1
    iget-object v0, p0, Les/jd0;->a:Ljava/net/Socket;

    invoke-virtual {v0}, Ljava/net/Socket;->getInetAddress()Ljava/net/InetAddress;

    move-result-object v0

    return-object v0
.end method

.method public e()Ljava/lang/String;
    .locals 1

    .line 1
    invoke-virtual {p0}, Les/jd0;->d()Ljava/net/InetAddress;

    move-result-object v0

    invoke-virtual {v0}, Ljava/net/InetAddress;->getHostName()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public f()Z
    .locals 1

    .line 1
    iget-object v0, p0, Les/jd0;->a:Ljava/net/Socket;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Ljava/net/Socket;->isConnected()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method protected g()V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-object v0, p0, Les/jd0;->a:Ljava/net/Socket;

    iget v1, p0, Les/jd0;->e:I

    invoke-virtual {v0, v1}, Ljava/net/Socket;->setSoTimeout(I)V

    .line 2
    iget-object v0, p0, Les/jd0;->a:Ljava/net/Socket;

    invoke-virtual {v0}, Ljava/net/Socket;->getInputStream()Ljava/io/InputStream;

    move-result-object v0

    iput-object v0, p0, Les/jd0;->b:Ljava/io/InputStream;

    .line 3
    iget-object v0, p0, Les/jd0;->a:Ljava/net/Socket;

    invoke-virtual {v0}, Ljava/net/Socket;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v0

    iput-object v0, p0, Les/jd0;->c:Ljava/io/OutputStream;

    return-void
.end method
